Mastering Ember.js by Mitchel Kelonye

Mastering Ember.js by Mitchel Kelonye

Author:Mitchel Kelonye [Kelonye, Mitchel]
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2014-10-19T21:00:00+00:00


This example yields the following:

<button class='btn btn-warning'>Button</button>

These class names are dasherized as per the Ember.js naming conventions. Hence, the btnWarning property is mapped to the btn-warning class name.

Sometimes, you might want to specify the class name to be used based on a given state. This is something we learned in Chapter 4, Writing Application Templates, for example:

var View = Ember.View.extend({ tagName: 'button', classNames: ['btn'], classNameBindings: ['warn:btnWarning'], warn: true });



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.